﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tunnel
{
    public partial class PlanAdd : Form
    {
        PlanForm planForm;
        public PlanAdd(PlanForm planForm)
        {
            InitializeComponent();
            this.planForm = planForm;
        }

        private void OK_Click(object sender, EventArgs e)
        {
            Global g = new Global();
            string sql = "INSERT INTO M_Plan (PlanID,PlanName,PlanText) VALUES ('" + g.CommandID + "','" + planName.Text + "','" + planText.Text + "')";
            SqlDBHelper sdh = new SqlDBHelper();
            sdh.ExecuteCommand(sql);
            planForm.LoadThePlanList();
            this.Close();
        }
    }
}
